package tianrun.ziguan.api.calculate.config.service.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisMessagePublisher {

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    public void publish(String channelName,String jsonMessage) {
        redisTemplate.convertAndSend(channelName, jsonMessage);
    }
}
